goog.provide('secureSites');
goog.provide('secureSites.constants');
goog.provide('secureSites.TriState');

/**
 * Translates an insecure URL to a secure URL.
 * @pram {!string} url insecure URL (starting with http://)
 * @return {!string} secure URL (starting with https://)
 */
secureSites.secureVersionOf = function(url) {
  return url.replace(/^http:\/\//i, 'https://');
};

/**
 * Enum for tri-state values.
 * @enum {number}
 */
secureSites.TriState = {
  TRUE: 1,
  FALSE: -1,
  MAYBE: 0
};

/** @const */ secureSites.constants.BLOCKING_EXTRA_INFO_SPEC = ['blocking'];
/** @const */ secureSites.constants.HTTP_ONLY_REQUEST_FILTER = { urls: ['http://*/*'] };
/** @const */ secureSites.constants.HTTPS_ONLY_REQUEST_FILTER = { urls: ['https://*/*'] };
/** @const */ secureSites.constants.EXTENSION_BASED_HTTPS_ONLY_REQUEST_FILTER = { urls: ['https://*/*'], tabId: -1 };